package cn.fj.hrm.validation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @Constraint 约束限制
 *  validatedBy 表示被谁验证，指定当前自定义注解的验证规则实现类
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = IdenticalPasswordValidator.class)
public @interface IdenticalPassword {
    String message() default "两次密码不一致！";
    Class<?>[] groups() default { };
    Class<? extends Payload>[] payload() default { };
}
